//<<<<<<< .mine
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Ex5_Banking;

/**
 *
 * @author Root
 */
public class Bank {

    private Customer[] customer = new Customer[5];
    private int numberOfCustomer;

    public static void main(String[] args) {
        Bank b = new Bank();
        String[] fnames = {"John", "Simms", "Bryant", "Soley", "Soley"};
        String[] lnames = {"Smith", "Jane", "Owen", "Tim", "Maria"};

        for (int i = 0; i < fnames.length; i++) {
            b.addCustomer(fnames[i], lnames[i]);
        }

        for (int i = 0; i < b.getNumberOfCustomer(); i++) {
            Customer c = b.getCustomer(i);
            int a=i+1;
            System.out.println("Customer [" + a + "] is " + c.getFirstName() + ", " + c.getLastName());
        }


    }




    public void addCustomer(String f, String l) {
        Customer cu = new Customer(f, l);
//        int index = 1;
        customer[numberOfCustomer]=cu;
        numberOfCustomer++;


    }

    public int getNumberOfCustomer() {
              return customer.length;
    }

    public Customer getCustomer(int index) {
//        Customer c = new Customer();
//        c.getFirstName();
//        c.getLastName();
//        c.getAccount();
        return customer[index];
    }

    public Bank() {
    }

}
//=======
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
